package com.crrc.yzt.demo.fragment

import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.Toast
import androidx.fragment.app.Fragment
import com.crrc.yzt.demo.activity.LocalActivity
import com.crrc.yzt.demo.blue.R
import com.crrc.yzt.demo.activity.LoginActivity
import com.crrc.yzt.demo.activity.TelnetUpdateActivity
import com.crrc.yzt.demo.blue.databinding.FragmentCarMoreBinding
import com.crrc.yzt.demo.utils.AppStore
import com.crrc.yzt.demo.utils.AppUtils
import com.lxj.xpopup.XPopup
import com.lxj.xpopup.core.CenterPopupView
import java.util.Locale


/**
 */
class MoreFragment() : Fragment() {



    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {

        val binding = FragmentCarMoreBinding.inflate(layoutInflater)

        binding.tvExit.setOnClickListener {
            startActivity(Intent(activity, LoginActivity::class.java))
            activity?.finish()
        }

        binding.tvUpdate.setOnClickListener {
            activity?.startActivity(Intent(activity, TelnetUpdateActivity::class.java).apply {
            })
        }
        binding.tvError.setOnClickListener {
            Toast.makeText(context,resources.getString(R.string.item_136),Toast.LENGTH_SHORT).show()
        }
        binding.tvCar.setOnClickListener {
            Toast.makeText(context,resources.getString(R.string.item_136),Toast.LENGTH_SHORT).show()
        }
        binding.tvChange.setOnClickListener {

            val intent = Intent(activity, LocalActivity::class.java)
            activity?.startActivity(intent);

        }

        return binding.root
    }




    companion object {

        @JvmStatic
        fun newInstance() =
            MoreFragment().apply {

            }
    }
}